package com.atmilan.quartz.model.dto.vietti;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

/**
 * Vietti商品源映射
 * @Description: 
 * @author Daigb
 * @date 2021-07-02
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ViettiProductResDTO {
    
    @JsonProperty(value = "meta")
    private Meta meta;
    
    @JsonProperty(value = "data")
    private List<Goods> goodsList;
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Meta {
        
        @JsonProperty(value = "executionTime")
        private String executionTime;

        @JsonProperty(value = "apiVersion")
        private String apiVersion;
        
        @JsonProperty(value = "items")
        private Integer items;
        
        @JsonProperty(value = "cacheHits")
        private Integer cacheHits;
        
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Goods {
        
        @JsonProperty(value = "productID")
        private String productId;
        
        @JsonProperty(value = "clientProductID")
        private String clientProductId;
        
        @JsonProperty(value = "spu")
        private String spu;
        
        @JsonProperty(value = "sku")
        private String sku;
        
        @JsonProperty(value = "brand")
        private String brand;
        
        @JsonProperty(value = "name")
        private String name;
        
        @JsonProperty(value = "description")
        private String description;
        
        @JsonProperty(value = "genre")
        private String genre;
        
        @JsonProperty(value = "type")
        private String type;
        
        @JsonProperty(value = "category")
        private String category;
        
        @JsonProperty(value = "season")
        private String season;
        
        @JsonProperty(value = "isCarryOver")
        private Boolean isCarryOver;
        
        @JsonProperty(value = "color")
        private String color;
        
        @JsonProperty(value = "composition")
        private String composition;
        
        @JsonProperty(value = "madeIn")
        private String madeIn;
        
        @JsonProperty(value = "retailPrice")
        private BigDecimal retailPrice;
        
        @JsonProperty(value = "price")
        private BigDecimal price;
        
        @JsonProperty(value = "pricesIncludeVat")
        private Boolean pricesIncludeVat;
        
        @JsonProperty(value = "productLastUpdated")
        private Date productLastUpdated;
        
        @JsonProperty(value = "sizeType")
        private String sizeType;
        
        @JsonProperty(value = "customData")
        private CustomData customData;
        
        @JsonProperty(value = "sizes")
        private List<Sizes> sizes;
        
        @JsonProperty(value = "photos")
        private List<String> photos;
        
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class CustomData {
        
        @JsonProperty(value = "SizeInfo")
        private String SizeInfo;
    }
    
    @Data
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class Sizes {
        
        @JsonProperty(value = "size")
        private String size;
        
        @JsonProperty(value = "stock")
        private Integer stock;
        
        @JsonProperty(value = "retailPrice")
        private BigDecimal retailPrice;
        
        @JsonProperty(value = "price")
        private BigDecimal price;
        
        @JsonProperty(value = "gtin")
        private String gtin;
        
    }
    
}
